package com.haiqi.modules.main.web;

import org.springframework.boot.autoconfigure.web.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by hythzx on 2016/5/23.
 */
@Controller
public class   SystemController implements ErrorController{

    private static final String ERROR_PATH = "/error";


    @RequestMapping(value = ERROR_PATH)
    public String error404(){
        System.out.println("找不到页面");
        return "/error/404.html";
    }

    @RequestMapping(value = ERROR_PATH+"/500")
    public String error500(){
        System.out.println("系统错误");
        return "/error/500.html";
    }

    @Override
    public String getErrorPath() {
        return ERROR_PATH;
    }
}
